<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>外边距</title>
    <style>
        div {
            width: 200px;
            height: 200px;
            background-color: #ffd265;

            /* 写法与padding一样 */
            /*margin: 20px;*/
            margin-top: 20px;
            margin-right: 10px;
            margin-bottom: 50px;
            margin-left: 40px;
            /*margin: 20px 10px 50px 40px;*/

        }
    </style>
</head>
<body>
<div>我是一个div</div>
</body>
</html>